Optimal. Leaf size=200 \[ \frac {2 \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{a d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {2 b \sqrt {\cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{a \left (a^2-b^2\right ) d \sqrt {\frac {b+a \cos (c+d x)}{a+b}}}-\frac {2 b \sin (c+d x)}{\left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {4349, 3928,
4120, 3941, 2734, 2732, 3943, 2742, 2740} \begin {gather*} -\frac {2 b \sin (c+d x)}{d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {2 b \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{a d \left (a^2-b^2\right ) \sqrt {\frac {a \cos (c+d x)+b}{a+b}}}+\frac {2 \sqrt {\frac {a \cos (c+d x)+b}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{a d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 3928
Rule 3941
Rule 3943
Rule 4120
Rule 4349
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \sec (c+d x))^{3/2}} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)}}{(a+b \sec (c+d x))^{3/2}} \, dx\\ &=-\frac {2 b \sin (c+d x)}{\left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}-\frac {\left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {b}{2}-\frac {1}{2} a \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+b \sec (c+d x)}} \, dx}{a^2-b^2}\\ &=-\frac {2 b \sin (c+d x)}{\left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+b \sec (c+d x)}} \, dx}{a}+\frac {\left (b \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx}{a \left (a^2-b^2\right )}\\ &=-\frac {2 b \sin (c+d x)}{\left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {\sqrt {b+a \cos (c+d x)} \int \frac {1}{\sqrt {b+a \cos (c+d x)}} \, dx}{a \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {\left (b \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {b+a \cos (c+d x)} \, dx}{a \left (a^2-b^2\right ) \sqrt {b+a \cos (c+d x)}}\\ &=-\frac {2 b \sin (c+d x)}{\left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {\sqrt {\frac {b+a \cos (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}}} \, dx}{a \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {\left (b \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}} \, dx}{a \left (a^2-b^2\right ) \sqrt {\frac {b+a \cos (c+d x)}{a+b}}}\\ &=\frac {2 \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{a d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {2 b \sqrt {\cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{a \left (a^2-b^2\right ) d \sqrt {\frac {b+a \cos (c+d x)}{a+b}}}-\frac {2 b \sin (c+d x)}{\left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 5.10, size = 245, normalized size = 1.22 \begin {gather*} \frac {2 \sqrt {\cos (c+d x)} (b+a \cos (c+d x)) \sec ^{\frac {3}{2}}(c+d x) \left (i b (a+b) \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} E\left (i \sinh ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {-a+b}{a+b}\right ) \sqrt {1+\sec (c+d x)}-i a (a+b) \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} F\left (i \sinh ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {-a+b}{a+b}\right ) \sqrt {1+\sec (c+d x)}+b (-a+b) \sqrt {\sec (c+d x)} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(497\) vs.
\(2(242)=484\).
time = 0.19, size = 498, normalized size = 2.49
method | result | size |
default | \(-\frac {2 \left (\EllipticF \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a -b}{a +b}}}{\sin \left (d x +c \right )}, \sqrt {-\frac {a +b}{a -b}}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, a +\EllipticE \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a -b}{a +b}}}{\sin \left (d x +c \right )}, \sqrt {-\frac {a +b}{a -b}}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, b +\sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \EllipticF \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a -b}{a +b}}}{\sin \left (d x +c \right )}, \sqrt {-\frac {a +b}{a -b}}\right ) a \sin \left (d x +c \right )+\sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \EllipticE \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a -b}{a +b}}}{\sin \left (d x +c \right )}, \sqrt {-\frac {a +b}{a -b}}\right ) b \sin \left (d x +c \right )-\sqrt {\frac {a -b}{a +b}}\, \cos \left (d x +c \right ) b +\sqrt {\frac {a -b}{a +b}}\, b \right ) \left (\sqrt {\cos }\left (d x +c \right )\right ) \sqrt {\frac {b +a \cos \left (d x +c \right )}{\cos \left (d x +c \right )}}}{d \left (b +a \cos \left (d x +c \right )\right ) \sin \left (d x +c \right ) \left (a +b \right ) \sqrt {\frac {a -b}{a +b}}\, a}\) | \(498\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.05, size = 541, normalized size = 2.70 \begin {gather*} -\frac {6 \, a^{2} b \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left (\sqrt {2} {\left (3 i \, a^{3} - 2 i \, a b^{2}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (3 i \, a^{2} b - 2 i \, b^{3}\right )}\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) + {\left (\sqrt {2} {\left (-3 i \, a^{3} + 2 i \, a b^{2}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-3 i \, a^{2} b + 2 i \, b^{3}\right )}\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) - 3 \, {\left (i \, \sqrt {2} a^{2} b \cos \left (d x + c\right ) + i \, \sqrt {2} a b^{2}\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right ) - 3 \, {\left (-i \, \sqrt {2} a^{2} b \cos \left (d x + c\right ) - i \, \sqrt {2} a b^{2}\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right )}{3 \, {\left ({\left (a^{5} - a^{3} b^{2}\right )} d \cos \left (d x + c\right ) + {\left (a^{4} b - a^{2} b^{3}\right )} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a + b \sec {\left (c + d x \right )}\right )^{\frac {3}{2}} \sqrt {\cos {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{\sqrt {\cos \left (c+d\,x\right )}\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________